<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>switch</title>
    <script>
        let date = new Date();
        let day = date.getDay();
        switch (day) {
            case 1: console.log("星期一"); break;
            case 2: console.log("星期二"); break;
            case 3: console.log("星期三"); break;
            case 4: console.log("星期四"); break;
            case 5: console.log("星期五"); break;
            case 6: console.log("星期六"); break;
            case 0: console.log("星期天"); break;
        }
        let num1 = prompt("请输入第一个数字");
        let op = prompt("请输入运算符");
        let num2 = prompt("请输入第二个数字");
        let res;
        switch (op) {
            case "加":
            case "+":res=num1*1+num2*1;break;
            case "减":
            case "-":res=num1-num2;break;
            case "乘":
            case "*":res=num1*num2;break;
            case "除":
            case "/":res=num1/num2;break;
            default: res=null;console.log("运算符不合法");
        }
        console.log(res)
    </script>
</head>

<body>

</body>

</html>